<%-- 
    Document   : report
    Created on : May 1, 2013, 1:58:59 AM
    Author     : Victoria Bula
--%>

<%@page import="com.charlie.db.TopProduct"%>
<%@page import="java.lang.reflect.Array"%>
<%@page import="com.charlie.beans.Product"%>
<%@page import="java.util.List"%>
<%@page import="java.sql.Connection"%>
<%@include file="/header.jsp"%>



<div class="left_side">
    <jsp:include page="/blocks/conditionalLeftBar.jsp" />
</div>

<div class="right_side"> 
    <h2 class="content_title">Report</h2>

    <div class="white_block">
        <h2><center>Top of the most popular guitars</center></h2>

        <table class="cart_table">
            <colgroup>
                <col style="width: 65%">
                <col style="width: 15%">
                <col style="width: 20%">
            </colgroup>
            <thread class="cart_header_border"> 
                <td style="text-align: center">guitar</td>
                <td>points</td>
                <td>cost</td>
            </thread>
            <tbody>
                <%
                    List<TopProduct> products = (List<TopProduct>) request.getAttribute("productList");
                    if (products != null) {
                        for (TopProduct product : products) {
                %>
                <tr>
                    <td><%= product.getName() %></td>
                    <td><%= product.getPoints() %></td>
                    <td><%= product.getCost() %>$</td>
                    <%
                        }
                    }
                    %>
            </tbody>
        </table>

        <form method="POST" style="float: right;">
    <!--    <input  name="id" type="hidden" value="<%=products%>">-->
            <input class="btn" value="Export" type="submit"> 
        </form>
            <br>
    </div>

    <jsp:include page="/blocks/pages.jsp">
        <jsp:param name="path" value="warehouse/report" />
    </jsp:include>
</div>

<%@include file="/footer.jsp"%>